package com.tangding.net.tcp;

import java.util.concurrent.ThreadFactory;

/**
 * @description 
 *
 * @author Ranger
 * @version 2017年4月24日_上午11:20:03
 *
 */
public class GameThreadFactory implements ThreadFactory {
	
	private String name;
	private boolean daemon;
	
	public GameThreadFactory(String name, boolean daemon) {
		this.name = name;
		this.daemon = daemon;
	}

	@Override
	public Thread newThread(Runnable r) {
		Thread td = new Thread(r);
		td.setName(name);
		td.setDaemon(daemon);
		return td;
	}

}